package com.cynen.job.service.impl;

import com.cynen.job.dao.JobInfoDao;
import com.cynen.job.pojo.JobInfo;
import com.cynen.job.service.JobInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JobInfoServiceImpl implements JobInfoService {

    @Autowired
    private JobInfoDao jobInfoDao;

    @Override
    public void save(JobInfo jobInfo) {
        jobInfoDao.save(jobInfo);
    }

    /**
     * 根据条件查询Jobinfo
     * @param jobInfo
     * @return
     */
    @Override
    public List<JobInfo> findAll(JobInfo jobInfo) {
        Example<JobInfo> example = Example.of(jobInfo);
        List<JobInfo> list = jobInfoDao.findAll(example);
        return list;
    }

}
